package nl.runnable.solr.xslt;

import nl.runnable.solr.util.SolrQueryRequestWrapper;

import org.apache.solr.common.util.ContentStream;
import org.apache.solr.request.SolrQueryRequest;

/**
 * {@link SolrRequestRequest} wrapper for returning transformed {@link ContentStream}s. Used internally by
 * {@link XsltUpdateHandler}.
 * 
 * @author Laurens Fridael
 * 
 */
class TransformedSolrQueryRequestWrapper extends SolrQueryRequestWrapper {

	private final Iterable<ContentStream> transformedContentStreams;

	TransformedSolrQueryRequestWrapper(final SolrQueryRequest request,
			final Iterable<ContentStream> transformedContentStreams) {
		super(request);
		this.transformedContentStreams = transformedContentStreams;
	}

	/**
	 * Returns transformed {@link ContentStream}s.
	 */
	@Override
	public Iterable<ContentStream> getContentStreams() {
		return transformedContentStreams;
	}
}